Merged
Conversation
knopers8
reviewed
Jan 14, 2026
Comment on lines
84
to
88
| # To invoke debug build you need to pass DEBUG variable with any value, eg: DEBUG=1 make WHAT=... | ||
| ifdef DEBUG | ||
| GCFLAGS= -gcflags="all=-N -l" | ||
| else | ||
| GCFLAGS= | ||
| endif | ||
|
|
Collaborator
There was a problem hiding this comment.
To be more future-proof, could you declare GCFLAGS in the main instruction flow and add the debug options optionally? I.e. GCFLAGS= $(GCFLAGS) -gcflags ....
knopers8
reviewed
Jan 14, 2026
Makefile
Outdated
| @echo -e "\033[1;33mgo build -mod=vendor\033[0m ./cmd/$@ \033[1;33m==>\033[0m \033[1;34m./bin/$@\033[0m" | ||
| # @echo ${PWD} | ||
| @$(WHAT_$@_BUILD_FLAGS) go build -mod=vendor $(VERBOSE_$(V)) -o bin/$@ $(LDFLAGS) ./cmd/$@ | ||
| @$(WHAT_$@_BUILD_FLAGS) go build -mod=vendor $(VERBOSE_$(V)) $(GCFLAGS) -o bin/$@ $(LDFLAGS) ./cmd/$@ |
Collaborator
There was a problem hiding this comment.
Suggested change
| @$(WHAT_$@_BUILD_FLAGS) go build -mod=vendor $(VERBOSE_$(V)) $(GCFLAGS) -o bin/$@ $(LDFLAGS) ./cmd/$@ | |
| @$(WHAT_$@_BUILD_FLAGS) go build -mod=vendor $(VERBOSE_$(V)) $(GCFLAGS) -o bin/$@ $(LDFLAGS) ./cmd/$@ |
I assume the added space does nothing.
a7182e8 to
bd939fe
Compare
knopers8
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case you need to debug something extensively in debugger and you can replicate the issue locally, you can now run
or
to create binaries with all the debug symbols and without optimizations (equivalent
-O0in gcc/clang) so you don't get those annoying problems while debugging like: